package com.py.credit.service;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import com.py.credit.entity.WarnRuleEntity;
import com.py.credit.entity.WarnSchemeEntity;
import com.py.framework.core.common.Page;

public interface OutInterfaceService {

	
	public Integer checkIsExist(String tybm);
	
    void addRule(WarnRuleEntity map);
    
	void addScheme(WarnSchemeEntity entity,List<String> tybms, MultipartFile file) throws Exception;
	
    Integer	checkIsExistScheme(@Param(value="mainType")String mainType,@Param(value="status")String status);
	
	void updateScheme(WarnSchemeEntity entity, List<String> tybms, MultipartFile file) throws Exception;
	
	void updateSchemeStatus(String status,String recordId);

	List<WarnSchemeEntity> selectSchemeForPage(String name,Page page,String type,String deptName, Long deptId, Long userId);
	
	void addRuleAssociation(@Param(value="ruleId")String ruleId,@Param(value="schemeId")String schemeId);

	void deleteRuleById(@Param(value="id") String id);
	
	void updateAssociationDel(@Param(value="schemeId")String schemeId);
	
	Map<String,Object> getRuleByTybm(@Param(value="tybm")String tybm,String kId,String appKey,String homesecretKey) throws Exception;

	Map<String, Object> getRuleByPersonTask(Map<String,Object> map,String kId,String tybm,String appKey,String homesecretKey) throws Exception ;

	Map<String, Object> getRuleByComTask(Map<String,Object> map,String kId,String tybm);
	
	List<Map> getCompanyInfo(@Param(value="name")String name,String kId,Page page);
	
	void deleteRuleByTybm(@Param(value="tybm")String tybm);
	
	void updateRuleById(WarnRuleEntity entity);
		
	List<Map<String,String>> getPeopleForPage(@Param(value= "tybm")String tybm,@Param(value="page")Page page,@Param(value="name")String name);

	List<Map<String,String>> getComForPage(@Param(value= "tybm")String tybm,@Param(value="page")Page page,@Param(value="name")String name);
	
    List<Map<String, Object>> selectComInfo();
	
	List<Map<String, Object>> selectPersonInfo();
	
	void addStatistics(@Param(value="list") List<Map<String,String>> list);
	
	void addRealateIndex();
	
	List<Map<String,String>> getWarnInfoData(@Param(value="type")String type,@Param(value="name")String name,Page page,@Param(value="tybm")String tybm,@Param(value="deptid")String deptid);

	List<WarnRuleEntity> selectRuleForPage(@Param(value="name")String name,@Param(value="mainType")String mainType,@Param(value="page")Page page, Long deptId, Long userId);

	List<Map<String,String>> selectRuleForBind(@Param(value="mainType")String mainType);

	void addModelTest();
	
	List<Map<String,Object>> getModelTestData(String tybm);
	
	List<Map<String,Object>> getCreditReportData(@Param(value="tybm")String tybm);

	public void delete(Integer id);

	public List<Map<String, Object>> selectUnComInfo();

	
	public List<Map<String,String>> selectWarnDept();

	
	
	public List<Map<String, String>> getWarnCompanyForPage(String type, String recordId, String mainType, Page page);


	
	public List<Map<String, String>> getIsWarnCompanyForPage(String type, String recordId, String mainType, Page page);
}
